<?php

namespace App\Http\Admin\Controllers\Order;


use App\Http\Admin\Services\Order\OrderService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;


class OrderSettController extends Controller
{

    protected $service;

    public function __construct(OrderService $orderService)
    {
        $this->service = $orderService;
    }
    /*
     * 订单统计页面
     */
    public function index(){
        return view('order.sett_order');
    }


    /*
     * 订单核算查询
     * */
    public function orderSettList(Request $request){
        $conditions = $request->all();

        $result = $this->service->orderSettList($conditions);

        $compare = $this->service->orderSettCompare($conditions);

        $tip = $this->service->orderTip($conditions,$compare);

        return res('订单核算列表',[
            'compare' => $compare,
            'tip' => $tip,
            'list' => $result
        ]);
    }

    /*
     * 订单核算查询
     * */
    public function orderSettExp(Request $request){
        $conditions = $request->all();

        $result = $this->service->orderSettExp($conditions);
    }
}